<template>
    <div class="mui-numbox" data-numbox-min='1'>
			<button class="mui-btn mui-btn-numbox-minus" type="button">-</button>
			<input id="test" class="mui-input-numbox" type="number" value="1" @change="getnumber"/>
			<button class="mui-btn mui-btn-numbox-plus" type="button">+</button>
	</div>
</template>
<script>
import mui from '../../../lib/js/mui.min.js'
export default {
	data(){
		return {
			number:''
		}
	},
	watch:{
		max:function(newvle,oldvle){
			mui(".mui-numbox").numbox().setOption("max",this.max);
	  },
	
	}, 
	created(){
		
	},
	methods: {
		 getnumber(){
			this.number=mui(".mui-numbox").numbox().getValue();
			this.$emit('func',this.number);
		 }
		 
	 },	 
	mounted(){
		mui(".mui-numbox").numbox()
	},	
    props:["max"]
}
</script>
<style scoped>


</style>